/// <reference path="./BaseOral.ts" />
namespace wmedu {
    /** 四则运算：单加法 */
    export class FourOper_Add extends BaseOral implements IOralCreater {
        create(opt: IOralOpt) {
            let paramArea = opt.paramArea;
            let ops: Enum_OralOp[] = [Enum_OralOp.Add];
            // 先得到结果值
            let value = this.mGetRandomInt(paramArea);
            let p1 = MathUtil.randomInt(value-1, 1);
            let p2 = value - p1;

            let str = BuildUtil.getOralStr(opt.blankSide, opt.blankStr, [p1, p2], ops, value);
            let res: IOralSide = { nums: [p1, p2], ops: ops, value: value, str }
            return res;
        }
    }
}